home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Grab Bag
/
Shareware Grab Bag.iso
/
090
/
mask12.arc
/
STATLIN.INC
< prev
next >
Wrap
Text File
|
1988-01-02
|
1KB
|
48 lines
'** STATLIN.INC : This routine display and updates the status of the
' insert, caps, num lock, scroll lock keys.
' skcolor% = background*16 + foreground
' statrow% = row to display status line
' statcol% = the starting column. The routine will figure spacing
' automatically.
' USAGE :
'TOP:
' DO
' A$ = INKEY$
' CALL KEYSTATLINE(95,25,60)
' LOOP WHILE A$ = ""
' IF ASC(A$) = 27 THEN END
' GOTO TOP
sub keystatline(skcolor%,statrow%,statcol%) static
' CALL GetKbd(insert%, caps%, numlk%, scrl%)
DEF SEG = &H40
STATUSBYTE = PEEK(&H17)
INSERT% = STATUSBYTE AND &H80
CAPS% = STATUSBYTE AND &H40
NUMLK% = STATUSBYTE AND &H20
SCRL% = STATUSBYTE AND &H10
DEF SEG
if insert% <> 0 then
CALL XQPRINT(chr$(179)+" INS ",statrow%,statcol%,skcolor%,0)
IF insert% <> 0 THEN LOCATE ,,,1,14
ELSE
CALL XQPRINT(chr$(179)+" ",statrow%,statcol%,skcolor%,0)
LOCATE ,,,5,7
END IF
IF caps% <> 0 THEN
CALL XQPRINT("CAPS ",statrow%,statcol%+6,skcolor%,0)
ELSE
CALL XQPRINT(" ",statrow%,statcol%+6,skcolor%,0)
END IF
IF numlk% <> 0 THEN
CALL XQPRINT("NMLK ",statrow%,statcol%+11,skcolor%,0)
ELSE
CALL XQPRINT(" ",statrow%,statcol%+11,skcolor%,0)
END IF
IF scrl% <> 0 THEN
CALL XQPRINT("SCRL",statrow%,statcol%+16,skcolor%,0)
ELSE
CALL XQPRINT(" ",statrow%,statcol%+16,skcolor%,0)
END IF
end sub